package com.myzl.coal.service.protocol;

import com.myzl.coal.dto.CmdDTO;
import com.myzl.coal.dto.SendCmdDTO;

import java.util.List;

/**
 *@ClassName: ProtocolService
 *@Author: wzb
 *@Date: 2022/10/30 16:37
 *@Description:
 */
public interface CmdService
{
    /**
     * success
     * @param sendCmdDTO
     * @return boolean
     * @author  wzb
     * @date 2023/1/4
     * @description
     */
    public boolean success(SendCmdDTO sendCmdDTO);

    /**
     * fail
     * @param sendCmdDTO
     * @return boolean
     * @author  wzb
     * @date 2023/1/4
     * @description
     */
    public boolean fail(SendCmdDTO sendCmdDTO);

    /**
     * getSendCmd
     * @param deviceId 设备id
     * @param key 命令
     * @return com.myzl.coal.dto.SendCmd
     * @author  wzb
     * @date 2022/11/1
     * @description
     */
    public SendCmdDTO getSendCmd(Integer deviceId,String key) ;
    /**
     * getSendCmd
     * @param
     * @return com.myzl.coal.dto.SendCmd
     * @author  wzb
     * @date 2022/11/7
     * @description
     */
    public List<SendCmdDTO> getSendCmd() ;

    /**
     * cmdTimeOut
     * @param
     * @return java.util.List<com.myzl.coal.dto.SendCmd>
     * @author  wzb
     * @date 2022/11/7
     * @description
     */
    public void cmdTimeOut() ;

    /**
     * sendCmd
     * @param sendCmdDTO
     * @return void
     * @author  wzb
     * @date 2022/11/1
     * @description
     */
    public void sendCmd(SendCmdDTO sendCmdDTO);

    /**
     * read
     * @param cmdDTO
     * @return com.myzl.coal.dto.SendCmdDTO
     * @author  wzb
     * @date 2022/12/30
     * @description
     */
    public SendCmdDTO read(CmdDTO cmdDTO);

    /**
     * write
     * @param cmdDTO
     * @return com.myzl.coal.dto.SendCmdDTO
     * @author  wzb
     * @date 2022/12/30
     * @description
     */
    public SendCmdDTO asyncWrite(CmdDTO cmdDTO);

    /**
     * write
     * @param cmdDTO
     * @return com.myzl.coal.dto.SendCmdDTO
     * @author  wzb
     * @date 2022/12/30
     * @description
     */
    public SendCmdDTO write(CmdDTO cmdDTO);

}
